package com.inspinia.auth.sso.server.interceptor;

import com.baomidou.kisso.web.WebKissoConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebSsoConfigurerAdapter extends WebMvcConfigurerAdapter {

    /**
     * 自定义拦截器
     *
     * @param registry
     */
    @Bean(initMethod = "initKisso")
    public WebKissoConfigurer webKissoConfigurer(){
        WebKissoConfigurer configurer = new WebKissoConfigurer();
        configurer.setCookieName("inspinia");
        return configurer;
    }
}
